package com.meihuayishu.backend.dto;

import lombok.Data;
import lombok.Builder;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import io.swagger.v3.oas.annotations.media.Schema;
import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(description = "批量AI解读响应")
public class BatchAiInterpretResponse {
    
    @Schema(description = "批次ID", example = "batch_1704097500456")
    private String batchId;
    
    @Schema(description = "处理成功数量", example = "2")
    private Integer processedCount;
    
    @Schema(description = "失败数量", example = "0")
    private Integer failedCount;
    
    @Schema(description = "解读结果列表")
    private List<BatchInterpretResult> results;
    
    @Schema(description = "总费用", example = "0.05")
    private Double totalCost;
    
    @Schema(description = "处理时间(秒)", example = "3.2")
    private Double processingTime;
    
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    @Schema(description = "批量解读结果")
    public static class BatchInterpretResult {
        @Schema(description = "是否成功", example = "true")
        private Boolean success;
        
        @Schema(description = "卦象编码", example = "QIAN_WEI_TIAN")
        private String hexagramCode;
        
        @Schema(description = "解读内容")
        private AiInterpretResponse.InterpretationContent interpretation;
        
        @Schema(description = "错误信息")
        private String error;
    }
}